package com.easybuy.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.easybuy.dao.BrandDao;
import com.easybuy.entity.Brand;
import com.easybuy.service.BrandService;

@Service("brandService")
public class BrandServiceImpl implements BrandService {

	@Autowired
	private BrandDao brandDao;

	public List<Brand> getList(String name, int first, int maxResult) {
		return brandDao.getList(name, first, maxResult);
	}

	public void add(Brand brand) {
		brandDao.add(brand);
	}

	public Brand getById(int id) {
		return brandDao.getById(id);
	}

	public void update(Brand brand) {
		brandDao.update(brand);
	}

	public void delete(int id) {
		brandDao.delete(id);
	}

	public int getCount(String name) {
		return brandDao.getCount(name);
	}

}
